<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html">

<h:head>
	<title>Image results for #{mainBean.imgResult.collatedQuery}</title>
</h:head>
<h:body bgcolor="white">
	<h3>JSF 2.0 - results.xhtml</h3>
	<div align="center">
		<h:form>
    	   <h:inputText value="#{mainBean.queryString}"></h:inputText>
    	   <h:commandButton value="Submit Query" action="results"></h:commandButton>
    	   <h:commandButton value="Submit Image Query" action="imageResults"></h:commandButton>
    	</h:form>
	</div>
	<h4>Results:</h4>
			<h4>Original Query: </h4><h:outputLabel value="#{mainBean.imgResult.originalQuery}"></h:outputLabel>
    	   	<h4>Collated Query: </h4><h:outputLabel value="#{mainBean.imgResult.collatedQuery}"></h:outputLabel>
    	   	<h:dataTable value="#{mainBean.imgResult.imgUrls}" var="url">
    	   		<h:column>
    	   			#{url}
    	   		</h:column>
    	   	</h:dataTable>

	<h:outputLabel rendered="#{empty mainBean.result}"> NOTHING FOUND! PLEASE TRY AGAIN</h:outputLabel>
	<h:form>
		<h:commandButton value="New Search" action="main"></h:commandButton>
	</h:form>
</h:body>
</html>
